#ifndef OBJECTS_H
#define OBJECTS_H

#include <iostream>
#include <allegro5/allegro5.h>
#include <allegro5/allegro_primitives.h>
#include <stdio.h>
#include "Globals.h"

class Objects
{
public:
        Objects();

        void initialise (int pos_x, int pos_y, int direction_x, int direction_y, float speed_x, float speed_y, int bound_x, int bound_y);
        void virtual update();
        void virtual render();

        void check_collision(Objects *collided_object);
        void virtual collided(int object_ID);
        bool collidable();

        void set_pos_x(int pos_x){_pos_x = pos_x;}
        void set_pos_y(int pos_y){_pos_y = pos_y;}
        int get_pos_x(){return _pos_x;}
        int get_pos_y(){return _pos_y;}

        void set_direction_x(int direction_x){_direction_x = direction_x;}
        void set_direction_y(int direction_y){_direction_y = direction_y;}
        int get_direction_x(){return _direction_x;}
        int get_direction_y(){return _direction_y;}

        void set_speed_x(float speed_x){_speed_x = speed_x;}
        void set_speed_y(float speed_y){_speed_y = speed_y;}
        float get_speed_x(){return _speed_x;}
        float get_speed_y(){return _speed_y;}

        void set_bound_x(int bound_x){_bound_x = bound_x;}
        void set_bound_y(int bound_y){_bound_y = bound_y;}
        int get_bound_x(){return _bound_x;}
        int get_bound_y(){return _bound_y;}

        void set_ID(int ID){_ID = ID;}
        int get_ID(){return _ID;}

        void set_alive(bool alive){_alive = alive;}
        bool get_alive(){return _alive;}

        void set_collidable(bool collidable){_collidable = collidable;}
        bool get_collidable(){return _collidable;}

        void virtual destroy();

        virtual ~Objects();

protected:

    int _pos_x;
    int _pos_y;

    int _direction_x;
    int _direction_y;

    float _speed_x;
    float _speed_y;

    int _bound_x;
    int _bound_y;

    ALLEGRO_BITMAP *_image;

private:


    bool _alive;
    bool _collidable;
    int _ID;



};

#endif // OBJECTS_H
